/*
 * Copyright 2016-2019 yoara
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package yhao.infra.apilist;

/**
 * API通用处理结果状态码
 *
 * @author yoara
 */
public enum JsonCommonCodeEnum implements JsonReturnCode {
	/** 正常返回 **/
	C0000("处理成功"),

	/** 常规的错误码START **/
	E0000("未知服务器错误"),
	E0001("处理失败"),
	E0002("参数不全或无效"),
	E0004("服务器正忙，请稍后"),
	E0005("服务器异常!"),
	E0006("参数格式不符合要求"),
	E0007("用户权限未通过校验"),
	E0008("用户未登录"),
	E0009("CSRF校验不通过"),
	E0010("RSA加密校验不通过"),
	E0011("上传失败!"),
	E0013("上传图片大小超过最大限制!"),
	E0014("excel上传异常!"),
	E0016("附件为空!"),
	E0017("内部访问限制"),
	E0018("服务请求超时，请稍后再试"),
	E0019("用户状态已更新，请重新登录"),
	E0020("数据重复"),
	/** 常规的错误码END **/
	;
	
	
	
	private String msg;
	
	JsonCommonCodeEnum(String msg){
		this.msg = msg;
	}
	
	@Override
	public String getMessage() {
		return msg;
	}
	
	@Override
	public String getStatus() {
		return name();
	}
}
